package com.rfid.wlandirectlib;

import android.net.wifi.p2p.WifiP2pDevice;
import android.net.wifi.p2p.WifiP2pGroup;
import android.net.wifi.p2p.WifiP2pInfo;

import androidx.annotation.NonNull;

import java.util.Collection;

/**
 * author: duke
 * version: 1.0
 * dateTime: 2019-05-20 18:24
 * description:
 */
public interface WifiP2PListener {

    public void onWifiP2pEnabled(boolean isEnabled);

    public void onDiscoverPeers(boolean isSuccess);

    public void onSelfDeviceAvailable(@NonNull WifiP2pDevice wifiP2pDevice);

    /**
     * 是否与服务器成功建立连接(与服务器连接成功、失败)
     *
     * @param wifiP2pInfo
     */
    public void onConnectionInfoAvailable(WifiP2pInfo wifiP2pInfo);

    /**
     * 扫描的设备结果
     *
     * @param wifiP2pDeviceList
     */
    public void onPeersAvailable(@NonNull Collection<WifiP2pDevice> wifiP2pDeviceList);

    public void onDiscoveryStatusChange(boolean isScan);

//    public void onGroupInfoAvailable(WifiP2pGroup group);

}
